# coding: utf-8
# Author: Legend奇
# @Time： 2020/12/1 下午3:30
from marshmallow import fields

from base.base_schema import BaseSchema


class OperationLogSchema(BaseSchema):
    op_type = fields.Str(source='get_op_type_display', read_only=True)
    op_sort = fields.Str(source='get_op_sort_display', read_only=True)

    class Meta:
        fields = ('username', 'ipv4', 'ipv6', 'op_type', 'op_sort', 'origin_data', 'desc', 'create_timestamp')
